Semiconductor device, data processing system, and semiconductor device control method

ABSTRACT

Bus/memory bandwidth consumption caused by reading of auxiliary information not included in compressed data is reduced. A memory stores compressed data and auxiliary information used to read the compressed data. A semiconductor device includes a cache in which auxiliary information stored in the memory is stored, a control unit which, when a read request for reading compressed data stored in the memory is received, reads from the cache auxiliary information about the compressed data, if stored in the cache, or reads the auxiliary information about the compressed data, if not stored in the cache, from the memory and stores the auxiliary information about the compressed data in the cache, and which reads the compressed data from the memory using the auxiliary information about the compressed data, and an expansion unit to expand the compressed data read from the memory.

CROSS-REFERENCE TO RELATED APPLICATIONS

The disclosure of Japanese Patent Application No. 2015-250937 filed onDec. 24, 2015 including the specification, drawings and abstract isincorporated herein by reference in its entirety.

BACKGROUND

The present invention relates to a semiconductor device, a dataprocessing system, and a semiconductor device control method which areused, for example, to store compressed data in an external memory.

Recently, semiconductor devices are widely used which perform variousarithmetic processing including image processing. When, in suchsemiconductor devices, data such as image data is written to a memory oris read from a memory, data is encoded, decoded, compressed, andexpanded conforming to a predetermined standard. Concerning reading ofcompressed data, the techniques disclosed in Japanese Unexamined PatentApplication Publication Nos. Hei 10 (1998)-27127 and 2006-099774 areknown.

In the technique disclosed in Japanese Unexamined Patent ApplicationPublication No. Hei 10 (1998)-27127, when compressed data is stored in amemory, memory address information indicating where the compressed datais stored is stored in the memory via a bus as auxiliary information foruse in reading the compressed data. The address information is used whenthe compressed data is to be read from the memory.

In the technique disclosed in Japanese Unexamined Patent ApplicationPublication No. 2006-099774, when compressed data is stored in a memory,data size information about the compressed data is stored as auxiliaryinformation in a direct memory access controller (DMAC) via a bus. Thedata size information is used when the compressed data is to be readfrom the memory.

SUMMARY

In the techniques disclosed in the above-mentioned patent literature,when reading compressed data from a memory, it is necessary to readauxiliary information via a bus. When the auxiliary information is read,much of the bus/memory bandwidth is consumed.

Other objects and novel features of the present invention will becomeapparent from the following description and the attached drawings.

According to an embodiment of the present invention, a semiconductordevice is provided with a cache for storing auxiliary information storedin a memory. When a request for reading compressed data stored in thememory is received, the semiconductor device reads auxiliary informationabout the compressed data from the cache, if storing the auxiliaryinformation, and reads the compressed data from the memory using theauxiliary information.

According to the above embodiment, consumption of the bus/memorybandwidth caused by reading of auxiliary information can be reduced.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram showing the configuration of a dataprocessing system according to a comparison example.

FIG. 2 is a flowchart describing a flow of operation of a semiconductordevice according to the comparison example.

FIG. 3 is a schematic diagram showing the configuration of a dataprocessing system according to a first embodiment of the presentinvention.

FIG. 4 is a flowchart describing a flow of operation of a semiconductordevice according to the first embodiment.

FIG. 5 is a schematic diagram showing the configuration of a dataprocessing system according to second and third embodiments of thepresent invention.

FIG. 6 is a diagram illustrating compressed data according to the secondand third embodiments.

FIG. 7 is a flowchart describing a flow of operation of a semiconductordevice according to the second embodiment.

FIG. 8 is a graph showing relationship between data length and memoryaccess efficiency.

DETAILED DESCRIPTION

Embodiments of the present invention will be described in the followingwith reference to the attached drawings. The following description andthe accompanying drawings include, where appropriate for clarificationof description, omissions and simplifications. The elements representedas functional blocks in the drawings can be configured hardware-wise,for example, with a central processing unit (CPU), memory and othercircuits or software-wise, for example, with programs loaded in memory.It will be obvious to those skilled in the art that such functionalblocks can be realized in various forms hardware-wise, software-wise, orby combination of hardware and software without being limited to anyparticular means. In the accompanying drawings, like elements aredenoted by like reference numerals and, in the following, duplicatedescriptions of like elements are omitted where appropriate.

(1) First Embodiment Configuration of Comparison Example

First, to make it easier to understand a first embodiment of the presentinvention, a comparison example considered by the present inventors willbe described. The configuration of a data processing system 9 of thecomparison example will be described first. The configuration is shownin FIG. 1. As shown, the data processing system 9 of the comparisonexample includes a semiconductor device 100, for example, large-scaleintegration (LSI) and a memory 20 provided outside the semiconductordevice 100.

The memory 20 stores compressed data. The memory 20 also storesauxiliary information for use in reading the compressed data. Theauxiliary information includes, for example, data size informationindicating the data length of compressed data and address informationindicating addresses at which compressed data is stored.

The semiconductor device 100 includes a control unit 11, an expansionunit 12, and a data bus 13. The control unit 11 reads compressed dataand auxiliary information stored in the memory 20 via the data bus 13.The expansion unit 12 expands the compressed data read from the memory20 by the control unit 11.

Operation of Comparison Example

Next, operation of the semiconductor device 100 of the comparisonexample will be described. FIG. 2 shows the flow of operation of thesemiconductor device 100 of the comparison example.

As shown in FIG. 2, when a request for reading compressed data stored inthe memory 20 is received (step S11), the control unit 11 readsauxiliary information about the compressed data from the memory 20 viathe data bus 13 (step S12).

Next, the control unit 11 reads, using the auxiliary information, thecompressed data from the memory 20 via the data bus 13 (step S13).

Subsequently, the expansion unit 12 expands the compressed data readfrom the memory 20 by the control unit 11 (step S14).

As described above, according to the semiconductor device 100 of thecomparison example, to read compressed data from the memory 20, it isnecessary to read auxiliary information from the memory 20 via the databus 13. Namely, according to the semiconductor device 100 of thecomparison example, every time compressed data is to be read from thememory 20, auxiliary information is read from the memory 20 via the databus 13. This is a problem in that much of the bus/memory bandwidth isconsumed to read auxiliary information not included in compressed data.

According to the present first embodiment of the present invention, theabove problem can be solved.

Configuration of First Embodiment

Next, the configuration of a data processing system 1 of the presentfirst embodiment will be described. The configuration is shown in FIG.3. As shown in FIG. 3, the data processing system 1 of the present firstembodiment differs from the data processing system 9 of the comparisonexample shown in FIG. 1 in that the data processing system 1 includes asemiconductor device 10 instead of the semiconductor device 100 includedin the data processing system 9.

Compared with the semiconductor device 100 of the comparison exampleshown in FIG. 1, the semiconductor device 10 additionally includes acache 14. The cache 14 stores auxiliary information stored, togetherwith compressed data, in the memory 20.

Operation of First Embodiment

Next, operation of the semiconductor device 10 of the present firstembodiment will be described. FIG. 4 shows the flow of operation of thesemiconductor device 10 of the present first embodiment.

As shown in FIG. 4, when a request for reading compressed data stored inthe memory 20 is received (step S21), the control unit 11 determineswhether or not auxiliary information about the compressed data is storedin the cache 14 (step S22).

When it is determined in step S22 that the auxiliary information isstored in the cache 14 (step S22=Yes), the control unit 11 reads theauxiliary information from the cache (step S23).

When it is determined that the auxiliary information is not stored inthe cache 14 (step S22=No), the control unit llreads the auxiliaryinformation from the memory 20 via the data bus 13 and stores theauxiliary information in the cache 14 (step S24).

Next, the control unit 11 reads, using the auxiliary information, thecompressed data from the memory 20 via the data bus 13 (step S25).

Subsequently, the expansion unit 12 expands the compressed data readfrom the memory 20 by the control unit 11 (step S26).

Effects of First Embodiment

According to the present first embodiment, when a request for readingcompressed data is received with auxiliary information about thecompressed data being stored in the cache 14, the auxiliary informationis read from the cache 14 and the compressed data is read from thememory 20 by using the auxiliary information.

Therefore, reading auxiliary information from the memory 20 via the databus 13 every time when reading compressed data from the memory 20 isavoided, so that consumption of the bus/memory bandwidth caused byreading of auxiliary information is reduced.

(2) Second Embodiment Configuration of Second Embodiment

A second embodiment of the present invention is equivalent to a morespecific version of the configuration of the first embodiment.

Configuration of Data Processing System of Second Embodiment

First, the configuration of a data processing system 2 of the presentsecond embodiment will be described. The configuration is shown in FIG.5. As shown in FIG. 5, the data processing system 2 of the presentsecond embodiment includes a semiconductor device 30, for example, anLSI and a double data rate (DDR) memory 40 provided outside thesemiconductor device 30. The semiconductor device 30 and the DDR memory40 respectively correspond to the semiconductor device 10 and the memory20 shown in FIG. 3.

The semiconductor device 30 compresses data outputted from an operationunit 31, being described later, included in the semiconductor device 30and stores the compressed data in the DDR memory 40. At this time, thesemiconductor device 30 also stores auxiliary information for use inreading the compressed data in the DDR memory 40. In the present secondembodiment, the auxiliary information is assumed to be data sizeinformation indicating the data length of the compressed data.

A method of storing compressed data used in the present secondembodiment will be described below. FIG. 6 is a schematic diagramconceptually showing compressed data storage. In the present secondembodiment, the semiconductor device 30 compresses data as shown in FIG.6 and stores the compressed data in the DDR memory 40.

For example, the semiconductor device 30 compresses data outputted fromthe operation unit 31 in 256-byte units. Each unit of compressed datahas a shorter data length than before being compressed. Therefore,plural units of compressed data stored in order in the DDR memory 40have data addresses shifted from their data addresses before beingcompressed. Hence, to make it possible to directly access the compresseddata at addresses shifted from before compression, it is necessary tokeep the data addresses before and after compression memorized in amutually related state.

As shown in FIG. 6, therefore, the semiconductor device 30 stores eachunit of compressed data to begin at the top address of the corresponding256-byte non-compressed data (data before compression). Namely, whenstoring each unit of compressed data, the semiconductor device 30 storesonly the compressed data without changing the top address of each unitof the compressed data from the top address of the corresponding256-byte data before compression.

Thus, in the present second embodiment, the top address of each unit ofcompressed data stored is the same as the top address of thecorresponding 256-byte unit of non-compressed data. This makes itunnecessary to memorize the data address before compression of each256-byte unit of non-compressed data, for example, the top address ofeach buffer. Also, it is possible to access optional units of compresseddata in any order (random access).

When reading desired compressed data from the DDR memory 40, thesemiconductor device 30 reads the compressed data beginning at the topaddress of the corresponding 256-byte unit. At this time, since thecompressed data is shorter in data length than before being compressed,it is not necessary to read the entire 256-byte unit. Only the portioncorresponding to the data length after compression is required to beread.

In the present second embodiment, when reading desired compressed data,the semiconductor device 30 uses the address (the same as the addressbefore compression) on the DDR memory at which the desired compresseddata is stored and the data size information indicating the data lengthof the desired compressed data.

When storing the compressed data in the DDR memory 40, the semiconductordevice 30 also stores, as auxiliary information, data size informationabout the compressed data in the DDR memory 40. At this time, the orderof storing the compressed data in the DDR memory 40 and the order ofstoring the data size information about the compressed data in the DDRmemory 40 are the same. Therefore, from the address on the DDR memory 40at which the desired compressed data is stored, the address on the DDRmemory 40 at which the data size information about the desiredcompressed data (hereinafter may also be referred to as “required datasize information” where appropriate) is stored can be known. Thus, therequired data size information can be read from the DDR memory 40.

Configuration of Semiconductor Device 30 of Second Embodiment

Next, the configuration of the semiconductor device 30 of the presentsecond embodiment will be described. As shown in FIG. 5, thesemiconductor device 30 includes the operation unit 31, an operationdata read control unit 32, a data size information cache unit 33, a DDRmemory control unit 34, a compressed data expansion unit 35, and a databus 36. The element configured with the operation data read control unit32, the data size information cache unit 33 (but, excluding a data sizeinformation buffer 335 being described later), and the DDR memorycontrol unit 34 corresponds to the control unit 11 shown in FIG. 3, andthe compressed data expansion unit 35 corresponds to the expansion unit12 shown in FIG. 3.

The operation unit 31 performs arithmetic processing, for example, imageprocessing. Data outputted from the operation unit 31 is compressed asshown in FIG. 6 and is then stored in the DDR memory 40. Note that,since the present second embodiment is characterized mainly by aconfiguration related with reading of compressed data stored in the DDRmemory 40, the elements related with data compression are omitted inFIG. 5.

When reading desired compressed data from the DDR memory 40, theoperation unit 31 sends a read request (read command) for reading thedesired compressed data to the operation data read control unit 32. Theread request includes the data address before compression of the desiredcompressed data (the same address as the address on the DDR memory 40 atwhich the desired compressed data is stored) and the data length beforecompression of the desired compressed data. For example, when theoperation unit 31 performs image processing, since the location ofdesired data on an image and the location of the desired data on the DDRmemory 40 correspond to each other, the operation unit 31 may include,in the read request, the address on the DDR memory 40 corresponding tothe location of the desired data on the image. The data address and datalength before compression are requested by the operation unit 31,because it is not known to the operation unit 31 that the data has beencompressed.

The operation data read control unit 32 performs control related withreading of compressed data stored in the DDR memory 40. For example,when a read request is received from the operation unit 31, theoperation data read control unit 32 transfers the read request to thedata size information cache unit 33.

When the read request is received from the operation unit 31 via theoperation data read control unit 32, the data size information cacheunit 33 determines whether or not the data size information about thecompressed data requested by the read request received is stored in thedata size information buffer 335 being described later. When the datasize information is not stored in the data size information buffer 335,the data size information cache unit 33 reads the data size informationstored in the DDR memory 40 via the data bus 36 and stores the data sizeinformation in the data size information buffer 335. Based on the datasize information, the data size information cache unit 33 replaces thedata length included in the read request received from the operationunit 31 with the data length after compression of the compressed data,then sends the read request to the DDR memory control unit 34 via thedata bus 36.

The DDR memory control unit 34 controls the DD memory 40. For example,when a read request is received from the data size information cacheunit 33, the DDR memory control unit 34 reads, based on the readrequest, compressed data from the DDR memory 40. To be specific, the DDRmemory control unit 34 reads, from the address included in the readrequest, compressed data of the data length included in the readrequest.

The compressed data expansion unit 35 receives the compressed data readby the DDR memory control unit 34 via the data bus 36 and expands thecompressed data. The data expanded by the compressed data expansion unit35 is sent to the operation unit 31 via the operation data read controlunit 32.

Configuration of Data Size Information Cache Unit 33 of SecondEmbodiment

Next, the configuration of the data size information cache unit 33 ofthe present second embodiment will be described. As shown in FIG. 5, thedata size information cache unit 33 includes an operation data requestanalysis unit 331, a read request generation unit 332, a TAG buffer 333,a TAG buffer control unit 334, a data size information buffer 335, and adata size information buffer control unit 336. The data size informationbuffer 335 corresponds to the cache 14 shown in FIG. 3. The otherelements configuring the data size information cache unit 33 correspondto the elements configuring the control unit 11 shown in FIG. 3.

The data size information buffer 335 stores data size information storedin the DDR memory 40.

The TAG buffer 333 stores management information indicating the datasize information stored in the data size information buffer 335. In thepresent second embodiment, the management information indicates theaddresses on the DDR memory 40 of the data size information stored inthe data size information buffer 335.

When a read request for reading desired compressed data from theoperation unit 31 via the operation read control unit 32 is received,the operation data request analysis unit 331 analyzes the read requestand performs processing based on the result of analysis. For example,the operation data request analysis unit 331 obtains, based on theaddress included in the read request, the address on the DDR memory 40at which the data size information about the desired compressed data isstored and passes the obtained address to the TAG buffer control unit334.

The TAG buffer control unit 334 controls the TAG buffer 333. Forexample, when an address is received from the operation data requestanalysis unit 331, the TAG buffer control unit 334 determines, based onmanagement information stored in the TAG buffer 333, whether or not therequired data size information stored at the address is stored in thedata size information buffer 335. When the data size information is notstored in the data size information buffer 335, the TAG buffer controlunit 334 instructs the read request generation unit 332 to generate aread request for reading the required data size information stored inthe DDR memory 40. Also, the TAG buffer control unit 334 stores, in theTAG buffer 333, management information about the required data sizeinformation for which the TAG buffer control unit 334 instructed readrequest generation.

The data size information buffer control unit 336 controls the data sizeinformation buffer 335. For example, when the required data sizeinformation is read from the DDR memory 40 by the DDR memory controlunit 34, the data size information buffer control unit 336 receives thedata size information via the data bus 36 and stores the data sizeinformation in the data size information buffer 335. When there is noavailable space left in the data size information buffer 335, the datasize information buffer control unit 336, for example, discards theoldest data size information stored in the data size information buffer335 and stores the new data size information in the buffer area vacatedby the oldest data size information.

When the required data size information is read from the data sizeinformation buffer 335 or the DDR memory 40, the operation data requestanalysis unit 331 determines the data length of the desired compresseddata based on the data size information. The operation data requestanalysis unit 331 then instructs the read request generation unit 332 toreplace the data length included in the read request received from theoperation unit 31 with the data length of the desired compressed data.

The read request generation unit 332 generates the read request asinstructed by the operation data request analysis unit 331 or the TAGbuffer control unit 334 and sends the read request generated to the DDRmemory control unit 34 via the data bus 36.

Operation of Second Embodiment

Next, operation of the semiconductor device 30 of the present secondembodiment will be described. FIG. 7 shows the flow of operation of thesemiconductor device 30 of the present second embodiment.

As shown in FIG. 7, the operation data request analysis unit 331receives, from the operation unit 31 via the operation data read controlunit 32, a read request for reading desired compressed data (step S31).The read request includes the data address before compression of thedesired compressed data (the same address as the address on the DDRmemory 40 at which the desired compressed data is stored) and the datalength before compression of the desired compressed data. The operationdata request analysis unit 331 obtains, based on the address included inthe received read request, the address on the DDR memory 40 at which thedata size information about the desired compressed data is stored andpasses the obtained address to the TAG buffer control unit 334.Subsequently, the TAG buffer control unit 334 determines, based on themanagement information stored in the TAG buffer 333, whether or not thedata size information stored at the address obtained from the operationdata request analysis unit 331 is stored in the data size informationbuffer 335 (step S32).

When it is determined in step S32 that the data size information isstored in the data size information buffer 335 (step S32=Yes), the datasize information buffer control unit 336 reads the data size informationfrom the data size information buffer 335 (step S33).

On the other hand, when it is determined in step S32 that the data sizeinformation is not stored in the data size information buffer 335 (stepS32=No), the read request generation unit 332 generates, under thecontrol of the TAG buffer control unit 334, a read request for readingthe required data size information and sends the generated read requestto the DDR memory control unit 34 via the data bus 36. Responding to theread request, the DDR memory control unit 34 reads the required datasize information from the DDR memory 40. The data size information readfrom the DDR memory 40 is received by the data size information buffercontrol unit 336 via the data bus 36. The data size information buffercontrol unit 336 stores the received data size information in the datasize information buffer 335 (step S34). Also, the TAG buffer controlunit 334 stores management information about the data size informationin the TAG buffer 333.

Subsequently, the operation data request analysis unit 331 determines,based on the data size information, the data length of the desiredcompressed data. The read request generation unit 332 replaces, underthe control of the operation data request analysis unit 331, the datalength included in the read request received from the operation unit 31with the data length of the compressed data (step S35).

Next, the read request generation unit 332 sends the read requestincluding the data length replaced in step S35 to the DDR memory controlunit 34 via the data bus 36. Responding to the read request, the DDRmemory control unit 34 reads the desired compressed data from the DDRmemory 40 (step S36).

Subsequently, the compressed data expansion unit 35 receives thecompressed data read from the DDR memory 40 via the data bus 36 andexpands the compressed data (step S37). The data expanded in thecompressed data expansion unit 35 is sent to the operation unit 31 viathe operation data read control unit 32.

Effects of Second Embodiment

Next, the effects of the present second embodiment will be described.According to the present second embodiment, when a request for readingcompressed data is received with the data size information about thecompressed data being stored in the data size information buffer 335,the data size information is read from the data size information buffer335 and, using the data size information, the compressed data is readfrom the DDR memory 40.

Therefore, reading of data size information from the DDR memory 40 viathe data bus 36 every time when reading compressed data from the DDRmemory 40 is avoided, so that consumption of the bus/memory bandwidthcaused by reading of data size information is reduced.

Specific Configuration Example of Second Embodiment

Next, a specific configuration example to realize the present secondembodiment will be described.

The operation unit 31 is assumed to be a decoder complying with thevideo compression standard H.264.

The compression method used is for lossless compression and, in themethod, variable-length compressed data is generated. To be specific,data outputted from the operation unit 31 is compressed in units (256bytes each) of 64×4 pixel blocks (64 pixels horizontally by 4 linesvertically) and the compressed data is managed after being rounded intounits of four data lengths, i.e. 64 bytes, 128 bytes, 192 bytes and 256bytes. The data size information is composed of two bits per 64×4 pixelblock. Also, the order of storing the compressed data in the DDR memory40 and the order of storing data size information about the compresseddata in the DDR memory 40 are the same.

The DDR memory 40 is assumed to be an LPDDR4 (low power DDR4).

According to the H.264 standard, a moving image is compressed in unitsof pictures and into three types of pictures, I/P/B.

An I picture is generated by compressing a picture using data availablefrom the picture itself and can be decoded by itself. A P/B picture isgenerated by compressing a picture based on the difference between thepicture and the results of earlier picture decoding (an earlier decodedpicture). Hence, the P/B picture can be made smaller in data size aftercompression than the I picture. In generating difference data requiredto generate a P/B picture, data on any part of a decoded image beingreferred to may be selected. For example, data on such a part as tominimize the data volume after compression may be selected.

The decoded picture referred to in generating a P/B picture is alsoreferred to as a “reference plane.” To generate difference data,reference planes for luminance and for color difference are required.According to the H.264 standard, up to 32 each reference planes forluminance and for color difference, totaling 64 planes, can be used.

Concrete effects of the present second embodiment specificallyconfigured as described above will be described below.

In the present second embodiment, when a read request for readingcompressed data is received with the data size information about thecompressed data being stored in the data size information buffer 335,the compressed data is read from the DDR memory 40 using the data sizeinformation stored in the data size information buffer 335. In this way,reading of data size information from the DDR memory 40 via the data bus36 every time when reading compressed data from the DDR memory 40 isavoided.

If it is necessary to read data size information from the DDR memory 40via the data bus 36 every time when reading compressed data, thebus/memory bandwidth consumed every time when two bits of data sizeinformation is read will be virtually equivalent to the consumptioncaused by reading 128 bytes of data. This will be described withreference to FIG. 8.

FIG. 8 shows a graph of transfer efficiency (access efficiency) of theDDR memory 40 per data transfer length. As shown, while the transferefficiency is nearly 100% when the data transfer length is 128 bytes orlonger, the transfer efficiency increasingly lowers as the data transferlength becomes increasingly shorter than 128 bytes. For example, whenthe data transfer length is 64 bytes, the transfer efficiency is about50%, that is, a period in which data cannot be transferred occurs at arate of once per two transfers. Thus, when the data transfer length isshorter than 128 bytes, periods during which data cannot be transferredoccur, making the data transfer virtually equivalent to a data transferof 128 bytes. Therefore, reading two bits of data size information isvirtually equivalent to reading data with a data length of 128 bytes. Inthe present second embodiment, as long as required data size informationis stored in the data size information buffer 335, reading of data sizeinformation from the DDR memory 40 via the data bus 36 does not occur,so that consumption of the bus/memory bandwidth is reduced.

Also, according to FIG. 8, when reading data size information, it isdesirable to read data size information of a predetermined unit forreading together. For example, it is desirable to read 128 bytes of datasize information including required data size information (two bits)together. In this case, the read request generation unit 332 generates aread request for reading 128 bytes of data size information counted fromthe address of the required data size information together. Comparedwith reading plural pieces of two-bit data size informationindividually, reading data size information of a predetermined unit forreading together as described above further reduces bus/memory bandwidthconsumption.

Also, if, without storing any data size information in the DDR memory40, all data size information is to be stored in a static random accessmemory (SRAM), not shown, included in the operation unit 31, a 96 KbyteSRAM is required in the case of full HD resolution though also dependenton the image size (as 64 times 1.5 Kbytes are required for 64 referenceplanes).

In the present second embodiment, on the other hand, data sizeinformation about 64 reference planes is managed using 128 bytes perreference plane, and the total memory space required is about 8 Kbytes,i.e. the data size information buffer 335 may be an 8 Kbyte SRAM.

(3) Third Embodiment Configuration and Operation of Third Embodiment

First, a configuration and operation of a third embodiment of thepresent invention will be described. The third embodiment is similar tothe second embodiment in configuration, but differs from the secondembodiment in operation.

In the second embodiment, data size information of a predetermined unitfor reading (e.g. a unit of 128 bytes) is read together and is stored inthe data size information buffer 335.

In the present third embodiment, when data size information of apredetermined unit for reading is read, the data size information of thenext unit contiguous in address from the first-read unit is also read,as advance reading, and is also stored in the data size informationbuffer 335. In this case, the read request generation unit 332 generatesa read request for reading 128 bytes of data size information from adesired address and also for reading, as advance reading, the next 128bytes of data size information that is contiguous in address from thefirst-read 128 bytes of data size information.

In the present third embodiment, when available capacity is not left inthe data size information buffer 335, the oldest data size informationis assumed to be discarded. In this way, depending on the capacity ofthe data size information buffer 335, when advance reading of data sizeinformation takes place as described above, the data size informationfirst read in the same read operation may possibly be discarded from thedata size information buffer 335.

It is therefore desirable that the read request generation unit 332determines whether or not to make such advance reading of data sizeinformation based on the capacity of the data size information buffer335. For example, such advance reading of data size information ispreferably made only when the data size information buffer 335 has acapacity not smaller than two times the predetermined unit for readingdata size information. This will prevent, in data size informationreading, the first-read unit of data size information from beingdiscarded from the data size information buffer 335 as a result ofsubsequent advance reading of the next unit of data size information.

Effects of Third Embodiment

Next, effects of the present third embodiment of the present inventionwill be described. According to the present third embodiment, when datasize information of a predetermined unit for reading is read, the datasize information of the next unit for reading contiguous in address fromthe preceding unit for reading is also read, as advance reading, and isstored in the data size information buffer 335.

For example, there are cases in which, when the operation unit 31 readscompressed data which is locally randomly located, the compressed datais generally located in order of address. In such cases, when some datasize information is read as advance reading as in the present thirdembodiment, a processing delay (miss penalty) caused when required datasize information is not found in the data size information buffer 335can be prevented. This prevents deterioration of the processingperformance of the operation unit 31.

Other effects of the present third embodiment are similar to those ofthe second embodiment.

Specific Configuration Example of Third Embodiment

Next, a specific configuration example to realize the present thirdembodiment will be described. The present third embodiment is assumed tobe realized using a configuration similar to the specific configurationexample of the second embodiment.

According to the H.264 standard, as described above, up to 32 eachreference planes for luminance and for color difference, totaling 64planes, can be used. In reality, however, there are many cases in whichthe operation unit 31 does not use the maximum numbers of the respectivereference planes. According to the H.264 standard, the numbers ofreference planes in use are stored in encoded form in the leading headerpart of compressed data, so that the operation unit 31 can know thenumber of reference planes in use before starting encoding processing.

According to the specific configuration example of the third embodiment,the data size information buffer 335 has a capacity which allows datasize information about 64 reference planes to be stored using 128 bytesper reference plane.

Therefore, when the total number of luminance reference planes andcolor-difference reference planes does not exceed 32 (for example, when16 each of luminance reference planes and color-difference referenceplanes are used), advance reading of data size information does notcause the data size information earlier-read in the same read operationto be discarded from the data size information buffer 335.

It is, therefore, desirable that, only on condition that the totalnumber of luminance reference planes and color-difference referenceplanes is 32 or smaller, when 128 bytes of data size informationincluding required data size information is read, the next 128 bytes ofdata size information contiguous in address from the preceding 128 bytesof data size information is also read as advance reading.

At this time, however, if the next 128 bytes of data size information isalready stored in the data size information buffer 335, advance readingof the next 128 bytes of data size information is not carried out. Thisavoids useless reading of data size information, so that the consumptionof the bus/memory bandwidth is further reduced.

(4) Other Embodiments

The invention made by the present inventors has been specificallydescribed based on embodiments, but the invention is not limited to theforegoing embodiments and can be modified in various ways withoutdeparting from the scope of the invention.

For example, even though, in connection with the foregoing second andthird embodiments, the auxiliary information used in reading compresseddata is described as data size information indicating the data length ofcompressed data, the auxiliary information is not limited to such datasize information. The auxiliary information may alternatively be addressinformation indicating addresses on a memory at which compressed data isstored.

In such a case, address information about compressed data is stored asauxiliary information in the memory. When a read request is issued, theaddress included in the read request is replaced, based on the addressinformation about the compressed data, with the address on the memory atwhich the compressed data is stored.

Also, the auxiliary information may include either or both of data sizeinformation and address information.

1-19. (canceled)
 20. A semiconductor device comprising: a control unitconfigured to read compressed data stored in a memory in response to aread request for reading the compressed data from the memory, the readrequest including an address of data before compression; and a cacheconfigured to store auxiliary information indicating a data length ofthe compressed data, the auxiliary information being stored in thememory together with the compressed data, wherein the compressed data isgenerated by compressing the data before compression in units of apredetermined data size, and is stored in a location of the memoryspecified by the address of the data before compression, and wherein,when reading the compressed data stored in the memory in response to theread request, the control unit: if the auxiliary information about thecompressed data to be read is stored in the cache, reads from the cachethe auxiliary information about the compressed data to be read, andreads from the memory the compressed data using the address included inthe read request and the auxiliary information read from the cache, ifthe auxiliary information about the compressed data to be read is notstored in the cache, reads from the memory the auxiliary informationabout the compressed data to be read, stores in the cache the auxiliaryinformation read from the memory, and reads from the memory thecompressed data using the address included in the read request and theauxiliary information read from the memory.
 21. The semiconductor deviceaccording to claim 20, wherein, when reading from the memory theauxiliary information about the compressed data to be read, the controlunit reads from the memory auxiliary information of a predetermined unitincluding the auxiliary information about the compressed data to beread, and stores in the cache the auxiliary information of thepredetermined units read from the memory.
 22. The semiconductor deviceaccording to claim 21, wherein, when reading from the memory and storingin the cache the auxiliary information of the predetermined unit, thecontrol unit reads, as advance reading, from the memory auxiliaryinformation of a next predetermined unit, and stores in the cache theauxiliary information of the next predetermined unit read from thememory, and wherein the auxiliary information of the predetermined unitand the auxiliary information of the next predetermined unit beingcontiguous in address.
 23. The semiconductor device according to claim22, wherein the control unit determines whether to read the auxiliaryinformation of the next predetermined unit based on a capacity of thecache.
 24. The semiconductor device according to claim 20, wherein thecontrol unit holds management information indicating the auxiliaryinformation stored in the cache, and determines whether the auxiliaryinformation about the compressed data to be read is stored in the cachebased on the management information.
 25. The semiconductor deviceaccording to claim 20, wherein an order of storing the compressed datain the memory and an order of storing auxiliary information about thecompressed data in the memory are identical.
 26. The semiconductordevice according to claim 20, further comprising an expansion unitconfigured to expand the compressed data read from the memory.
 27. Thesemiconductor device according to claim 20, further comprising anoperation unit configured to output the read request.
 28. A dataprocessing system comprising: the semiconductor device according toclaim 20, and the memory configured to store the compressed data and theauxiliary information.
 29. A control method of the semiconductor devicefor reading compressed data stored in a memory using auxiliaryinformation, wherein the semiconductor device comprises a cache, theauxiliary information indicates a data length of the compressed data andis stored in the memory together with the compressed data, thecompressed data is generated by compressing data before compression inunits of a predetermined data size and is stored in a location of thememory specified by an address of the data before compression, thecontrol method comprising: generating a read request for reading thecompressed data from the memory, the read request including the addressof the data before compression; determining whether the auxiliaryinformation about the compressed data to be read is stored in the cachein response to the read request; if the auxiliary information about thecompressed data to be read is stored in the cache, reading from thecache the auxiliary information about the compressed data to be read;reading from the memory the compressed data using the address includedin the read request and the auxiliary information read from the cache;if the auxiliary information about the compressed data to be read is notstored in the cache, reading from the memory the auxiliary informationabout the compressed data to be read; storing in the cache the auxiliaryinformation read from the memory; and reading from the memory thecompressed data using the address included in the read request and theauxiliary information read from the memory.
 30. The control method ofthe semiconductor device according to claim 29, wherein the reading fromthe memory the auxiliary information about the compressed data to beread comprises reading from the memory auxiliary information of apredetermined unit which includes the auxiliary information about thecompressed data to be read, and wherein the storing in the cache theauxiliary information read from the memory comprises storing in thecache the auxiliary information of the predetermined units read from thememory.
 31. The control method of the semiconductor device according toclaim 30, further comprising: reading, as advance reading, from thememory auxiliary information of a next predetermined unit; and storingin the cache the auxiliary information of the next predetermined unitread from the memory, wherein the auxiliary information of thepredetermined unit and the auxiliary information of the nextpredetermined unit are contiguous in address.
 32. The control method ofthe semiconductor device according to claim 29, wherein the determiningcomprises: holding management information indicating the auxiliaryinformation stored in the cache; and determining whether the auxiliaryinformation about the compressed data to be read is stored in the cachebased on the management information.
 33. The control method of thesemiconductor device according to claim 29, further comprising expandingthe compressed data read from the memory.